/**
 * 
 */
package com.feib.stms.dao.jdbc.rowmapper;

import java.sql.ResultSet;

import org.springframework.jdbc.core.RowMapper;

import com.feib.stms.model.ActionLog;
import com.feib.stms.model.Securities;

/**
 * @author Jimmy Liu
 *
 */
public class ActionLogRowMapper extends BaseRowMapper<ActionLog> implements RowMapper<ActionLog> 
{

	private static final long serialVersionUID = 4540128308547693864L;
	
	public ActionLogRowMapper() 
	{
		super(ActionLog.class);
	}
	
	@Override
	protected ActionLog doOtherMapRow(ResultSet rs, int rowNumber, ActionLog entity) {
		entity.setSecurities(new Securities());
		entity.getSecurities().setSecuritiesPk((Long)getColumnValue(rs, "SECURITIES_PK", Long.class));
		entity.getSecurities().setSecuritiesNo((String)getColumnValue(rs, "SECURITIES_NO", String.class));
		entity.getSecurities().setSecuritiesName((String)getColumnValue(rs, "SECURITIES_NAME", String.class));
		
		return entity;
	}
}
